// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdUserRoles
 */
public class AdUserRolesDaoImpl
    extends org.tinaelle.server.domain.AdUserRolesDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdUserRolesDao#toAdUserRolesDTO(org.tinaelle.server.domain.AdUserRoles)
     */
    public org.tinaelle.common.dto.AdUserRolesDTO toAdUserRolesDTO(final org.tinaelle.server.domain.AdUserRoles entity)
    {
        return super.toAdUserRolesDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdUserRoles loadAdUserRolesFromAdUserRolesDTO(org.tinaelle.common.dto.AdUserRolesDTO adUserRolesDTO)
    {
        org.tinaelle.server.domain.AdUserRoles adUserRoles = this.load(adUserRolesDTO.getAdUserRolesId());
        if (adUserRoles == null)
        {
            adUserRoles = org.tinaelle.server.domain.AdUserRoles.Factory.newInstance();
        }
        return adUserRoles;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdUserRolesDao#adUserRolesDTOToEntity(org.tinaelle.common.dto.AdUserRolesDTO)
     */
    public org.tinaelle.server.domain.AdUserRoles adUserRolesDTOToEntity(org.tinaelle.common.dto.AdUserRolesDTO adUserRolesDTO)
    {
        org.tinaelle.server.domain.AdUserRoles entity = this.loadAdUserRolesFromAdUserRolesDTO(adUserRolesDTO);
        this.adUserRolesDTOToEntity(adUserRolesDTO, entity, true);
        return entity;
    }
}